

<%@ page import="com.pandorasoft.shop.Shop" %>
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="kickstart" />
	<g:set var="entityName" value="${message(code: 'shop.label', default: 'Shop')}" />
	<title><g:message code="default.create.label" args="[entityName]" /></title>
</head>

<body>

<section id="create" class="first">

	<g:hasErrors bean="${shopInstance}">
	<div class="alert alert-error">
		<g:renderErrors bean="${shopInstance}" as="list" />
	</div>
	</g:hasErrors>
	
	<g:form action="save" class="form-horizontal" >
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'name', 'error')}">
								<label for="name" class="control-label"><g:message code="shop.name.label" default="Name" /></label>
				            	<div class="controls">
									<g:textField name="name" value="${shopInstance?.name}" />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'name', 'error')}</span>
								</div>
							</div>
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'province', 'error')}">
								<label for="province" class="control-label"><g:message code="shop.province.label" default="Province" /></label>
				            	<div class="controls">
									<g:textField name="province" value="${shopInstance?.province}" />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'province', 'error')}</span>
								</div>
							</div>
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'location', 'error')}">
								<label for="location" class="control-label"><g:message code="shop.location.label" default="Location" /></label>
				            	<div class="controls">
									<g:textField name="location" value="${shopInstance?.location}" />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'location', 'error')}</span>
								</div>
							</div>
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'tel', 'error')}">
								<label for="tel" class="control-label"><g:message code="shop.tel.label" default="Tel" /></label>
				            	<div class="controls">
									<g:textField name="tel" value="${shopInstance?.tel}" />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'tel', 'error')}</span>
								</div>
							</div>
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'phone', 'error')}">
								<label for="phone" class="control-label"><g:message code="shop.phone.label" default="Phone" /></label>
				            	<div class="controls">
									<g:textField name="phone" value="${shopInstance?.phone}" />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'phone', 'error')}</span>
								</div>
							</div>
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'googleMap', 'error')}">
								<label for="googleMap" class="control-label"><g:message code="shop.googleMap.label" default="Google Map" /></label>
				            	<div class="controls">
									<g:textField name="googleMap" value="${shopInstance?.googleMap}" />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'googleMap', 'error')}</span>
								</div>
							</div>
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'company', 'error')}">
								<label for="company" class="control-label"><g:message code="shop.company.label" default="Company" /></label>
				            	<div class="controls">
									<g:select name="company.id" from="${com.pandorasoft.shop.Company.list()}" optionKey="id" value="${shopInstance?.company?.id}"  />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'company', 'error')}</span>
								</div>
							</div>
				
							<div class="control-group ${hasErrors(bean: shopInstance, field: 'shopType', 'error')}">
								<label for="shopType" class="control-label"><g:message code="shop.shopType.label" default="Shop Type" /></label>
				            	<div class="controls">
									<g:select name="shopType.id" from="${com.pandorasoft.shop.ShopType.list()}" optionKey="id" value="${shopInstance?.shopType?.id}"  />
									<span class="help-inline">${hasErrors(bean: shopInstance, field: 'shopType', 'error')}</span>
								</div>
							</div>
				
		<div class="form-actions">
			<g:submitButton name="create" class="save btn-primary" value="${message(code: 'default.button.create.label', default: 'Create')}" />
            <button class="btn" type="reset">Cancel</button>
		</div>
	</g:form>
	
</section>
		
</body>

</html>
